From ae3b44aeb1cbf60eabb3f23d424009501b996d29 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 10 Apr 2003 03:17:13 +0000 Subject: [PATCH] Allow command line arguments to xcsv-derived files. --- gpsbabel/vecs.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gpsbabel/vecs.c b/gpsbabel/vecs.c index c67cff2c9..fb7c61c51 100644 --- a/gpsbabel/vecs.c +++ b/gpsbabel/vecs.c @@ -215,10 +215,25 @@ find_vec(char *const vecname, char **opts) * is to search the list of xcsv styles. */ while (svec->name) { + arglist_t *ap; + char *res; + if (strcmp(svecname, svec->name)) { svec++; continue; } + + res = strchr(vecname, ','); + if (res) { + *opts = strchr(vecname, ',') + 1; + if (vec_list[0].vec->args) { + for (ap = vec_list[0].vec->args; ap->argstring; ap++) { + *ap->argval = get_option(*opts, ap->argstring); + } + } + } else { + *opts = NULL; + } xcsv_read_internal_style(svec->style_buf); xfree(v); -- 2.30.2